-
Notifications
You must be signed in to change notification settings - Fork 720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic block forging for the P2P mode #4024
Conversation
3f667be
to
3b52070
Compare
3b52070
to
f13bf8f
Compare
b142e38
to
f757059
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the data flow looks reasonable to me. 👍
I'm not Approving, because I'm not Node and also I didn't review the handler logic -- I only double-checked that the new handler calls the function I was expecting it would. So I Approve those parts, but I didn't review everything.
This work is ongoing. |
f757059
to
c9fc1c9
Compare
c9fc1c9
to
9304ae9
Compare
9304ae9
to
ff0dce6
Compare
ff0dce6
to
ed2a73d
Compare
63ba255
to
20d8f19
Compare
20d8f19
to
a1d0c3a
Compare
9cc9107
to
1594803
Compare
Make code type check
- The moving of UseLedger was needed in order to import `Cardano.Node.Protocol (ProtocolInstantiationError)` - Added new constructors to Startup Tracer
Block Forging can be enabled/disabled through SIGHUP signal. Sending such a signal will trigger the node to read the block forging credential files. Since the credential files are passed via CLI flags one can not remove them without restarting the node. For this effect, in order for one to be able to disable block forging, moving/renaming/deleting the file at the specified path (for the credential flags) and then sending the SIGHUP signal is what needs to be done. The code will detect that the specified files do not exist and it will disable block forging, while tracing the appropriate log messages. In case one wants to start a block producing node (i.e. passing the credentials in the respective flags) but doesn't want it to actually behave as a BP, there's a new `--start-as-non-producing-node` flag that will run the node with credentials as a normal node. However on SIGHUP it will read the credential files and start forging. Refactor code to accomodate the changes Added EnabledBlockForging type Co-authored-by: Marcin Szamotulski <coot@coot.me>
1594803
to
9350e00
Compare
Closed in favor of #5383 (comment) |
Description:
This PR introduces dynamic updates to the block forging configuration, enabling and disabling block forging through the SIGHUP signal. It addresses issue input-output-hk/ouroboros-network#3159 and relies on changes in ouroboros-consensus#140 and cardano-api#45.
Main changes:
Dependencies Update: The
ouroboros-consensus
andcardano-api
dependencies have been updated to accommodate the changes needed for this feature.Improved Import Structure: The
UseLedger
type was moved to prevent cyclic imports, improving the overall import structure.Adding of
SomeBlockType
andReflBlockType
How it works:
Block forging can now be dynamically enabled/disabled through SIGHUP signal. This is done by triggering the node to read the block forging credential files upon receiving the signal. To disable block forging, one must move/rename/delete the file at the specified path (for the credential flags) and then send the SIGHUP signal. The code will then disable block forging and trace the appropriate log messages.